Page({
  data: {
    userInfo: {
      avatar: "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg", // 头像
      nick: "小明", // 昵称
      win: 3, // 赢
      lose: 6, // 输
      odds: 0, // 胜率
      friendRank: 4, //好友排名
    }, // 用户信息
    friendRankLists: [
      { rank: 1, avatar: "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg", nick:"小明", win:2, lose:2, odds: 50},
      { rank: 2, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2663731566,1300187783&fm=26&gp=0.jpg", nick: "小红", win: 3, lose: 3, odds: 40 },
      { rank: 3, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1475232205,3375712928&fm=26&gp=0.jpg", nick: "小黄", win: 4, lose: 4, odds: 30 },
      { rank: 4, avatar: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=328989488,2515663679&fm=26&gp=0.jpg", nick: "小强", win: 5, lose: 5, odds: 20 },
      { rank: 5, avatar: "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg", nick: "小明", win: 2, lose: 2, odds: 50 },
      { rank: 6, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2663731566,1300187783&fm=26&gp=0.jpg", nick: "小红", win: 3, lose: 3, odds: 40 },
      { rank: 7, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1475232205,3375712928&fm=26&gp=0.jpg", nick: "小黄", win: 4, lose: 4, odds: 30 },
      { rank: 8, avatar: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=328989488,2515663679&fm=26&gp=0.jpg", nick: "小强", win: 5, lose: 5, odds: 20 },
      { rank: 9, avatar: "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg", nick: "小明", win: 2, lose: 2, odds: 50 },
      { rank: 10, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2663731566,1300187783&fm=26&gp=0.jpg", nick: "小红", win: 3, lose: 3, odds: 40 },
      { rank: 11, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1475232205,3375712928&fm=26&gp=0.jpg", nick: "小黄", win: 4, lose: 4, odds: 30 },
      { rank: 12, avatar: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=328989488,2515663679&fm=26&gp=0.jpg", nick: "小强", win: 5, lose: 5, odds: 20 },
    ], // 好友排行榜信息
    globalRankLists: [
      { rank: 1, avatar: "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg", nick: "小明", win: 2, lose: 2, odds: 50 },
      { rank: 2, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2663731566,1300187783&fm=26&gp=0.jpg", nick: "小红", win: 3, lose: 3, odds: 40 },
      { rank: 3, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1475232205,3375712928&fm=26&gp=0.jpg", nick: "小黄", win: 4, lose: 4, odds: 30 },
      { rank: 4, avatar: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=328989488,2515663679&fm=26&gp=0.jpg", nick: "小强", win: 5, lose: 5, odds: 20 },
      { rank: 5, avatar: "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg", nick: "小明", win: 2, lose: 2, odds: 50 },
      { rank: 6, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2663731566,1300187783&fm=26&gp=0.jpg", nick: "小红", win: 3, lose: 3, odds: 40 },
      { rank: 7, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1475232205,3375712928&fm=26&gp=0.jpg", nick: "小黄", win: 4, lose: 4, odds: 30 },
      { rank: 8, avatar: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=328989488,2515663679&fm=26&gp=0.jpg", nick: "小强", win: 5, lose: 5, odds: 20 },
      { rank: 9, avatar: "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg", nick: "小明", win: 2, lose: 2, odds: 50 },
      { rank: 10, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2663731566,1300187783&fm=26&gp=0.jpg", nick: "小红", win: 3, lose: 3, odds: 40 },
      { rank: 1245, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1475232205,3375712928&fm=26&gp=0.jpg", nick: "小黄", win: 4, lose: 4, odds: 30 },
      { rank: 1245, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1475232205,3375712928&fm=26&gp=0.jpg", nick: "小黄", win: 4, lose: 4, odds: 30 },
      { rank: 1245, avatar: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1475232205,3375712928&fm=26&gp=0.jpg", nick: "小黄", win: 4, lose: 4, odds: 30 },
    ], // 全球排行榜信息
    globalRank: '', //判断好友 or 全区
  },
  // 底部返回首页按钮
  goBack() {
    wx.navigateBack();
  },
  onLoad(options) {
    // 根据首页传递的参数，赋值给globalRank 判断 好友/全区 排行
    let global = options.global;
    this.setData({
      globalRank: global
    })
  }
})